//
//  RollToll.m
//  Roll Ball1.1.1
//
//  Created by Cui Luhai on 10-7-14.
//  Copyright 2010 China Academy of Art. All rights reserved.
//

#import "RollToll.h"


@implementation RollToll

+ (int) randomInt : (int) range{
	srandom(time(NULL)+random());
	return random() % range;
}

+ (CGFloat) randomVelocityWith : (int) difficultyLevel{
	int baseSeed = 10 + difficultyLevel * 10;
	return (CGFloat) ([RollToll randomInt:baseSeed] + 5) /10;
}

@end
